/*    */ package bupt.luo.demo.util;
/*    */ 
/*    */ import bupt.luo.demo.common.ApiResult;
/*    */ 
/*    */ public class ResultUtil
/*    */ {
/*    */   public static ApiResult success(Object data, String message) {
/*  8 */     ApiResult apiResult = new ApiResult();
/*  9 */     apiResult.setCode(0);
/* 10 */     apiResult.setMessage(message);
/* 11 */     apiResult.setDATA(data);
/* 12 */     return apiResult;
/*    */   }
/*    */   public static ApiResult success(String message) {
/* 15 */     return success(null, message);
/*    */   }
/*    */   public static <T> ApiResult<T> error(Integer code, String message) {
/* 18 */     ApiResult<T> apiResult = new ApiResult();
/* 19 */     apiResult.setCode(code.intValue());
/* 20 */     apiResult.setMessage(message);
/* 21 */     return apiResult;
/*    */   }
/*    */ }


/* Location:              C:\Users\28293\Desktop\demo-0.0.1-SNAPSHOT\BOOT-INF\classes.zip!\classes\bupt\luo\dem\\util\ResultUtil.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */